<foreach  name="data" key="code" item="map">
    function format_{$code|strtolower}(value, row, index) {
        if(!value) return '';
        var str = '';
        var dict ={:json_encode($map)};
        var vs = value.split(',');
        for(var i=0;i<vs.length;i++){
        str += ',' + dict[vs[i]];
        }
        if(str.length>1) str = str.substring(1);
        return str;
    }
    <php>echo "\r\n";</php>
</foreach >
